import initialState from "./state";
const reducer = (state = initialState, action) => {
    let d = Object.assign({},state);
    switch (action.type) {
        case 'CHANGE_TEXT':
            d.text ++;
            d.sasas ++;
            break;
        case 'BUTTON_CLICK':
            d.text --;
            d.sasas --;
            break;
        case 'CLICKCHILID':
            d.num ++;
            break;
        default:
            return d;
    }
    return d;
};

export default reducer
